// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement;

internal sealed partial class IndexSettingsConverter : JsonConverter<IndexSettings>
{
	public override IndexSettings Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
	{
		if (reader.TokenType != JsonTokenType.StartObject)
			throw new JsonException("Unexpected JSON detected.");
		var variant = new IndexSettings();
		Dictionary<string, object> additionalProperties = null;
		while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
		{
			if (reader.TokenType == JsonTokenType.PropertyName)
			{
				var property = reader.GetString();
				if (property == "analysis")
				{
					variant.Analysis = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis?>(ref reader, options);
					continue;
				}

				if (property == "analyze")
				{
					variant.Analyze = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze?>(ref reader, options);
					continue;
				}

				if (property == "auto_expand_replicas")
				{
					variant.AutoExpandReplicas = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "blocks")
				{
					variant.Blocks = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks?>(ref reader, options);
					continue;
				}

				if (property == "check_on_startup")
				{
					variant.CheckOnStartup = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup?>(ref reader, options);
					continue;
				}

				if (property == "codec")
				{
					variant.Codec = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "creation_date")
				{
					variant.CreationDate = JsonSerializer.Deserialize<long?>(ref reader, options);
					continue;
				}

				if (property == "creation_date_string")
				{
					variant.CreationDateString = JsonSerializer.Deserialize<DateTimeOffset?>(ref reader, options);
					continue;
				}

				if (property == "default_pipeline")
				{
					variant.DefaultPipeline = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "final_pipeline")
				{
					variant.FinalPipeline = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "format")
				{
					variant.Format = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "gc_deletes")
				{
					variant.GcDeletes = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Duration?>(ref reader, options);
					continue;
				}

				if (property == "hidden")
				{
					variant.Hidden = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "highlight")
				{
					variant.Highlight = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight?>(ref reader, options);
					continue;
				}

				if (property == "index")
				{
					variant.Index = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings?>(ref reader, options);
					continue;
				}

				if (property == "indexing_pressure")
				{
					variant.IndexingPressure = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure?>(ref reader, options);
					continue;
				}

				if (property == "indexing.slowlog")
				{
					variant.IndexingSlowlog = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings?>(ref reader, options);
					continue;
				}

				if (property == "lifecycle")
				{
					variant.Lifecycle = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle?>(ref reader, options);
					continue;
				}

				if (property == "load_fixed_bitset_filters_eagerly")
				{
					variant.LoadFixedBitsetFiltersEagerly = JsonSerializer.Deserialize<bool?>(ref reader, options);
					continue;
				}

				if (property == "mapping")
				{
					variant.Mapping = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings?>(ref reader, options);
					continue;
				}

				if (property == "max_docvalue_fields_search")
				{
					variant.MaxDocvalueFieldsSearch = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_inner_result_window")
				{
					variant.MaxInnerResultWindow = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_ngram_diff")
				{
					variant.MaxNgramDiff = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_refresh_listeners")
				{
					variant.MaxRefreshListeners = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_regex_length")
				{
					variant.MaxRegexLength = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_rescore_window")
				{
					variant.MaxRescoreWindow = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_result_window")
				{
					variant.MaxResultWindow = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_script_fields")
				{
					variant.MaxScriptFields = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_shingle_diff")
				{
					variant.MaxShingleDiff = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_slices_per_scroll")
				{
					variant.MaxSlicesPerScroll = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "max_terms_count")
				{
					variant.MaxTermsCount = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "merge")
				{
					variant.Merge = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge?>(ref reader, options);
					continue;
				}

				if (property == "mode")
				{
					variant.Mode = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "number_of_replicas")
				{
					variant.NumberOfReplicas = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "number_of_routing_shards")
				{
					variant.NumberOfRoutingShards = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "number_of_shards")
				{
					variant.NumberOfShards = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "priority")
				{
					variant.Priority = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "provided_name")
				{
					variant.ProvidedName = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Name?>(ref reader, options);
					continue;
				}

				if (property == "queries")
				{
					variant.Queries = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries?>(ref reader, options);
					continue;
				}

				if (property == "query_string")
				{
					variant.QueryString = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString?>(ref reader, options);
					continue;
				}

				if (property == "refresh_interval")
				{
					variant.RefreshInterval = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Duration?>(ref reader, options);
					continue;
				}

				if (property == "routing")
				{
					variant.Routing = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting?>(ref reader, options);
					continue;
				}

				if (property == "routing_partition_size")
				{
					variant.RoutingPartitionSize = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "routing_path")
				{
					variant.RoutingPath = SingleOrManySerializationHelper.Deserialize<string>(ref reader, options);
					continue;
				}

				if (property == "search")
				{
					variant.Search = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch?>(ref reader, options);
					continue;
				}

				if (property == "settings")
				{
					variant.Settings = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings?>(ref reader, options);
					continue;
				}

				if (property == "similarity")
				{
					variant.Similarity = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities?>(ref reader, options);
					continue;
				}

				if (property == "soft_deletes")
				{
					variant.SoftDeletes = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes?>(ref reader, options);
					continue;
				}

				if (property == "sort")
				{
					variant.Sort = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort?>(ref reader, options);
					continue;
				}

				if (property == "store")
				{
					variant.Store = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage?>(ref reader, options);
					continue;
				}

				if (property == "time_series")
				{
					variant.TimeSeries = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries?>(ref reader, options);
					continue;
				}

				if (property == "top_metrics_max_size")
				{
					variant.TopMetricsMaxSize = JsonSerializer.Deserialize<int?>(ref reader, options);
					continue;
				}

				if (property == "translog")
				{
					variant.Translog = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog?>(ref reader, options);
					continue;
				}

				if (property == "uuid")
				{
					variant.Uuid = JsonSerializer.Deserialize<string?>(ref reader, options);
					continue;
				}

				if (property == "verified_before_close")
				{
					variant.VerifiedBeforeClose = JsonSerializer.Deserialize<object?>(ref reader, options);
					continue;
				}

				if (property == "version")
				{
					variant.Version = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning?>(ref reader, options);
					continue;
				}

				additionalProperties ??= new Dictionary<string, object>();
				var additionalValue = JsonSerializer.Deserialize<object>(ref reader, options);
				additionalProperties.Add(property, additionalValue);
			}
		}

		variant.OtherSettings = additionalProperties;
		return variant;
	}

	public override void Write(Utf8JsonWriter writer, IndexSettings value, JsonSerializerOptions options)
	{
		writer.WriteStartObject();
		if (value.OtherSettings is not null)
		{
			foreach (var additionalProperty in value.OtherSettings)
			{
				writer.WritePropertyName(additionalProperty.Key);
				JsonSerializer.Serialize(writer, additionalProperty.Value, options);
			}
		}

		if (value.Analysis is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, value.Analysis, options);
		}

		if (value.Analyze is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, value.Analyze, options);
		}

		if (!string.IsNullOrEmpty(value.AutoExpandReplicas))
		{
			writer.WritePropertyName("auto_expand_replicas");
			writer.WriteStringValue(value.AutoExpandReplicas);
		}

		if (value.Blocks is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, value.Blocks, options);
		}

		if (value.CheckOnStartup is not null)
		{
			writer.WritePropertyName("check_on_startup");
			JsonSerializer.Serialize(writer, value.CheckOnStartup, options);
		}

		if (!string.IsNullOrEmpty(value.Codec))
		{
			writer.WritePropertyName("codec");
			writer.WriteStringValue(value.Codec);
		}

		if (value.CreationDate.HasValue)
		{
			writer.WritePropertyName("creation_date");
			writer.WriteNumberValue(value.CreationDate.Value);
		}

		if (value.CreationDateString is not null)
		{
			writer.WritePropertyName("creation_date_string");
			JsonSerializer.Serialize(writer, value.CreationDateString, options);
		}

		if (!string.IsNullOrEmpty(value.DefaultPipeline))
		{
			writer.WritePropertyName("default_pipeline");
			writer.WriteStringValue(value.DefaultPipeline);
		}

		if (!string.IsNullOrEmpty(value.FinalPipeline))
		{
			writer.WritePropertyName("final_pipeline");
			writer.WriteStringValue(value.FinalPipeline);
		}

		if (value.Format is not null)
		{
			writer.WritePropertyName("format");
			JsonSerializer.Serialize(writer, value.Format, options);
		}

		if (value.GcDeletes is not null)
		{
			writer.WritePropertyName("gc_deletes");
			JsonSerializer.Serialize(writer, value.GcDeletes, options);
		}

		if (value.Hidden is not null)
		{
			writer.WritePropertyName("hidden");
			JsonSerializer.Serialize(writer, value.Hidden, options);
		}

		if (value.Highlight is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, value.Highlight, options);
		}

		if (value.Index is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, value.Index, options);
		}

		if (value.IndexingPressure is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, value.IndexingPressure, options);
		}

		if (value.IndexingSlowlog is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, value.IndexingSlowlog, options);
		}

		if (value.Lifecycle is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, value.Lifecycle, options);
		}

		if (value.LoadFixedBitsetFiltersEagerly.HasValue)
		{
			writer.WritePropertyName("load_fixed_bitset_filters_eagerly");
			writer.WriteBooleanValue(value.LoadFixedBitsetFiltersEagerly.Value);
		}

		if (value.Mapping is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, value.Mapping, options);
		}

		if (value.MaxDocvalueFieldsSearch.HasValue)
		{
			writer.WritePropertyName("max_docvalue_fields_search");
			writer.WriteNumberValue(value.MaxDocvalueFieldsSearch.Value);
		}

		if (value.MaxInnerResultWindow.HasValue)
		{
			writer.WritePropertyName("max_inner_result_window");
			writer.WriteNumberValue(value.MaxInnerResultWindow.Value);
		}

		if (value.MaxNgramDiff.HasValue)
		{
			writer.WritePropertyName("max_ngram_diff");
			writer.WriteNumberValue(value.MaxNgramDiff.Value);
		}

		if (value.MaxRefreshListeners.HasValue)
		{
			writer.WritePropertyName("max_refresh_listeners");
			writer.WriteNumberValue(value.MaxRefreshListeners.Value);
		}

		if (value.MaxRegexLength.HasValue)
		{
			writer.WritePropertyName("max_regex_length");
			writer.WriteNumberValue(value.MaxRegexLength.Value);
		}

		if (value.MaxRescoreWindow.HasValue)
		{
			writer.WritePropertyName("max_rescore_window");
			writer.WriteNumberValue(value.MaxRescoreWindow.Value);
		}

		if (value.MaxResultWindow.HasValue)
		{
			writer.WritePropertyName("max_result_window");
			writer.WriteNumberValue(value.MaxResultWindow.Value);
		}

		if (value.MaxScriptFields.HasValue)
		{
			writer.WritePropertyName("max_script_fields");
			writer.WriteNumberValue(value.MaxScriptFields.Value);
		}

		if (value.MaxShingleDiff.HasValue)
		{
			writer.WritePropertyName("max_shingle_diff");
			writer.WriteNumberValue(value.MaxShingleDiff.Value);
		}

		if (value.MaxSlicesPerScroll.HasValue)
		{
			writer.WritePropertyName("max_slices_per_scroll");
			writer.WriteNumberValue(value.MaxSlicesPerScroll.Value);
		}

		if (value.MaxTermsCount.HasValue)
		{
			writer.WritePropertyName("max_terms_count");
			writer.WriteNumberValue(value.MaxTermsCount.Value);
		}

		if (value.Merge is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, value.Merge, options);
		}

		if (!string.IsNullOrEmpty(value.Mode))
		{
			writer.WritePropertyName("mode");
			writer.WriteStringValue(value.Mode);
		}

		if (value.NumberOfReplicas is not null)
		{
			writer.WritePropertyName("number_of_replicas");
			JsonSerializer.Serialize(writer, value.NumberOfReplicas, options);
		}

		if (value.NumberOfRoutingShards.HasValue)
		{
			writer.WritePropertyName("number_of_routing_shards");
			writer.WriteNumberValue(value.NumberOfRoutingShards.Value);
		}

		if (value.NumberOfShards is not null)
		{
			writer.WritePropertyName("number_of_shards");
			JsonSerializer.Serialize(writer, value.NumberOfShards, options);
		}

		if (value.Priority is not null)
		{
			writer.WritePropertyName("priority");
			JsonSerializer.Serialize(writer, value.Priority, options);
		}

		if (value.ProvidedName is not null)
		{
			writer.WritePropertyName("provided_name");
			JsonSerializer.Serialize(writer, value.ProvidedName, options);
		}

		if (value.Queries is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, value.Queries, options);
		}

		if (value.QueryString is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, value.QueryString, options);
		}

		if (value.RefreshInterval is not null)
		{
			writer.WritePropertyName("refresh_interval");
			JsonSerializer.Serialize(writer, value.RefreshInterval, options);
		}

		if (value.Routing is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, value.Routing, options);
		}

		if (value.RoutingPartitionSize.HasValue)
		{
			writer.WritePropertyName("routing_partition_size");
			writer.WriteNumberValue(value.RoutingPartitionSize.Value);
		}

		if (value.RoutingPath is not null)
		{
			writer.WritePropertyName("routing_path");
			JsonSerializer.Serialize(writer, value.RoutingPath, options);
		}

		if (value.Search is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, value.Search, options);
		}

		if (value.Settings is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, value.Settings, options);
		}

		if (value.Similarity is not null)
		{
			writer.WritePropertyName("similarity");
			JsonSerializer.Serialize(writer, value.Similarity, options);
		}

		if (value.SoftDeletes is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, value.SoftDeletes, options);
		}

		if (value.Sort is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, value.Sort, options);
		}

		if (value.Store is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, value.Store, options);
		}

		if (value.TimeSeries is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, value.TimeSeries, options);
		}

		if (value.TopMetricsMaxSize.HasValue)
		{
			writer.WritePropertyName("top_metrics_max_size");
			writer.WriteNumberValue(value.TopMetricsMaxSize.Value);
		}

		if (value.Translog is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, value.Translog, options);
		}

		if (!string.IsNullOrEmpty(value.Uuid))
		{
			writer.WritePropertyName("uuid");
			writer.WriteStringValue(value.Uuid);
		}

		if (value.VerifiedBeforeClose is not null)
		{
			writer.WritePropertyName("verified_before_close");
			JsonSerializer.Serialize(writer, value.VerifiedBeforeClose, options);
		}

		if (value.Version is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, value.Version, options);
		}

		writer.WriteEndObject();
	}
}

/// <summary>
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-modules.html#index-modules-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
/// </summary>
[JsonConverter(typeof(IndexSettingsConverter))]
public sealed partial class IndexSettings
{
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? Analysis { get; set; }

	/// <summary>
	/// <para>
	/// Settings to define analyzers, tokenizers, token filters and character filters.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? Analyze { get; set; }
	public string? AutoExpandReplicas { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? Blocks { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartup { get; set; }
	public string? Codec { get; set; }
	public long? CreationDate { get; set; }
	public DateTimeOffset? CreationDateString { get; set; }
	public string? DefaultPipeline { get; set; }
	public string? FinalPipeline { get; set; }
	public object? Format { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletes { get; set; }
	public object? Hidden { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? Highlight { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Index { get; set; }

	/// <summary>
	/// <para>
	/// Configure indexing back pressure limits.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressure { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlog { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? Lifecycle { get; set; }
	public bool? LoadFixedBitsetFiltersEagerly { get; set; }

	/// <summary>
	/// <para>
	/// Enable or disable dynamic mapping for an index.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? Mapping { get; set; }
	public int? MaxDocvalueFieldsSearch { get; set; }
	public int? MaxInnerResultWindow { get; set; }
	public int? MaxNgramDiff { get; set; }
	public int? MaxRefreshListeners { get; set; }
	public int? MaxRegexLength { get; set; }
	public int? MaxRescoreWindow { get; set; }
	public int? MaxResultWindow { get; set; }
	public int? MaxScriptFields { get; set; }
	public int? MaxShingleDiff { get; set; }
	public int? MaxSlicesPerScroll { get; set; }
	public int? MaxTermsCount { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? Merge { get; set; }
	public string? Mode { get; set; }
	public object? NumberOfReplicas { get; set; }
	public int? NumberOfRoutingShards { get; set; }
	public object? NumberOfShards { get; set; }

	/// <summary>
	/// <para>
	/// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the <a href="https://github.com/elastic/elasticsearch-specification">Elasticsearch API specification</a> so that they can be added in a future release
	/// </para>
	/// </summary>
	public IDictionary<string, object> OtherSettings { get; set; }
	public object? Priority { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedName { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? Queries { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryString { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshInterval { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? Routing { get; set; }
	public int? RoutingPartitionSize { get; set; }
	public ICollection<string>? RoutingPath { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? Search { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; }

	/// <summary>
	/// <para>
	/// Configure custom similarity settings to customize how search results are scored.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? Similarity { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletes { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? Sort { get; set; }

	/// <summary>
	/// <para>
	/// The store module allows you to control how index data is stored and accessed on disk.
	/// </para>
	/// </summary>
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? Store { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeries { get; set; }
	public int? TopMetricsMaxSize { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? Translog { get; set; }
	public string? Uuid { get; set; }
	public object? VerifiedBeforeClose { get; set; }
	public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? Version { get; set; }
}

/// <summary>
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-modules.html#index-modules-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
/// </summary>
public sealed partial class IndexSettingsDescriptor<TDocument> : SerializableDescriptor<IndexSettingsDescriptor<TDocument>>
{
	internal IndexSettingsDescriptor(Action<IndexSettingsDescriptor<TDocument>> configure) => configure.Invoke(this);

	public IndexSettingsDescriptor() : base()
	{
	}

	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor> AnalysisDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? AnalyzeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor AnalyzeDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor> AnalyzeDescriptorAction { get; set; }
	private string? AutoExpandReplicasValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? BlocksValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor BlocksDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor> BlocksDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartupValue { get; set; }
	private string? CodecValue { get; set; }
	private long? CreationDateValue { get; set; }
	private DateTimeOffset? CreationDateStringValue { get; set; }
	private string? DefaultPipelineValue { get; set; }
	private string? FinalPipelineValue { get; set; }
	private object? FormatValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletesValue { get; set; }
	private object? HiddenValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor HighlightDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor> HighlightDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> IndexDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> IndexDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor IndexingPressureDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor> IndexingPressureDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlogValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor IndexingSlowlogDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor> IndexingSlowlogDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? LifecycleValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor LifecycleDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor> LifecycleDescriptorAction { get; set; }
	private bool? LoadFixedBitsetFiltersEagerlyValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? MappingValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor MappingDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor> MappingDescriptorAction { get; set; }
	private int? MaxDocvalueFieldsSearchValue { get; set; }
	private int? MaxInnerResultWindowValue { get; set; }
	private int? MaxNgramDiffValue { get; set; }
	private int? MaxRefreshListenersValue { get; set; }
	private int? MaxRegexLengthValue { get; set; }
	private int? MaxRescoreWindowValue { get; set; }
	private int? MaxResultWindowValue { get; set; }
	private int? MaxScriptFieldsValue { get; set; }
	private int? MaxShingleDiffValue { get; set; }
	private int? MaxSlicesPerScrollValue { get; set; }
	private int? MaxTermsCountValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? MergeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor MergeDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor> MergeDescriptorAction { get; set; }
	private string? ModeValue { get; set; }
	private object? NumberOfReplicasValue { get; set; }
	private int? NumberOfRoutingShardsValue { get; set; }
	private object? NumberOfShardsValue { get; set; }
	private IDictionary<string, object> OtherSettingsValue { get; set; }
	private object? PriorityValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedNameValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? QueriesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor QueriesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor> QueriesDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryStringValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor QueryStringDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor> QueryStringDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshIntervalValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? RoutingValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor RoutingDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor> RoutingDescriptorAction { get; set; }
	private int? RoutingPartitionSizeValue { get; set; }
	private ICollection<string>? RoutingPathValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor SearchDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor> SearchDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> SettingsDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> SettingsDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? SimilarityValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor SoftDeletesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor> SoftDeletesDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor<TDocument> SortDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor<TDocument>> SortDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor StoreDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor> StoreDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeriesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor TimeSeriesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor> TimeSeriesDescriptorAction { get; set; }
	private int? TopMetricsMaxSizeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? TranslogValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor TranslogDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor> TranslogDescriptorAction { get; set; }
	private string? UuidValue { get; set; }
	private object? VerifiedBeforeCloseValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? VersionValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor VersionDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor> VersionDescriptorAction { get; set; }

	public IndexSettingsDescriptor<TDocument> Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis)
	{
		AnalysisDescriptor = null;
		AnalysisDescriptorAction = null;
		AnalysisValue = analysis;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor descriptor)
	{
		AnalysisValue = null;
		AnalysisDescriptorAction = null;
		AnalysisDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Analysis(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor> configure)
	{
		AnalysisValue = null;
		AnalysisDescriptor = null;
		AnalysisDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Settings to define analyzers, tokenizers, token filters and character filters.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? analyze)
	{
		AnalyzeDescriptor = null;
		AnalyzeDescriptorAction = null;
		AnalyzeValue = analyze;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor descriptor)
	{
		AnalyzeValue = null;
		AnalyzeDescriptorAction = null;
		AnalyzeDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Analyze(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor> configure)
	{
		AnalyzeValue = null;
		AnalyzeDescriptor = null;
		AnalyzeDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> AutoExpandReplicas(string? autoExpandReplicas)
	{
		AutoExpandReplicasValue = autoExpandReplicas;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? blocks)
	{
		BlocksDescriptor = null;
		BlocksDescriptorAction = null;
		BlocksValue = blocks;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor descriptor)
	{
		BlocksValue = null;
		BlocksDescriptorAction = null;
		BlocksDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Blocks(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor> configure)
	{
		BlocksValue = null;
		BlocksDescriptor = null;
		BlocksDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> CheckOnStartup(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? checkOnStartup)
	{
		CheckOnStartupValue = checkOnStartup;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Codec(string? codec)
	{
		CodecValue = codec;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> CreationDate(long? creationDate)
	{
		CreationDateValue = creationDate;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> CreationDateString(DateTimeOffset? creationDateString)
	{
		CreationDateStringValue = creationDateString;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> DefaultPipeline(string? defaultPipeline)
	{
		DefaultPipelineValue = defaultPipeline;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> FinalPipeline(string? finalPipeline)
	{
		FinalPipelineValue = finalPipeline;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Format(object? format)
	{
		FormatValue = format;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> GcDeletes(Elastic.Clients.Elasticsearch.Serverless.Duration? gcDeletes)
	{
		GcDeletesValue = gcDeletes;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Hidden(object? hidden)
	{
		HiddenValue = hidden;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? highlight)
	{
		HighlightDescriptor = null;
		HighlightDescriptorAction = null;
		HighlightValue = highlight;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor descriptor)
	{
		HighlightValue = null;
		HighlightDescriptorAction = null;
		HighlightDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Highlight(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor> configure)
	{
		HighlightValue = null;
		HighlightDescriptor = null;
		HighlightDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index)
	{
		IndexDescriptor = null;
		IndexDescriptorAction = null;
		IndexValue = index;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> descriptor)
	{
		IndexValue = null;
		IndexDescriptorAction = null;
		IndexDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Index(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> configure)
	{
		IndexValue = null;
		IndexDescriptor = null;
		IndexDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Configure indexing back pressure limits.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? indexingPressure)
	{
		IndexingPressureDescriptor = null;
		IndexingPressureDescriptorAction = null;
		IndexingPressureValue = indexingPressure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor descriptor)
	{
		IndexingPressureValue = null;
		IndexingPressureDescriptorAction = null;
		IndexingPressureDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> IndexingPressure(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor> configure)
	{
		IndexingPressureValue = null;
		IndexingPressureDescriptor = null;
		IndexingPressureDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? indexingSlowlog)
	{
		IndexingSlowlogDescriptor = null;
		IndexingSlowlogDescriptorAction = null;
		IndexingSlowlogValue = indexingSlowlog;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor descriptor)
	{
		IndexingSlowlogValue = null;
		IndexingSlowlogDescriptorAction = null;
		IndexingSlowlogDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> IndexingSlowlog(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor> configure)
	{
		IndexingSlowlogValue = null;
		IndexingSlowlogDescriptor = null;
		IndexingSlowlogDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? lifecycle)
	{
		LifecycleDescriptor = null;
		LifecycleDescriptorAction = null;
		LifecycleValue = lifecycle;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor descriptor)
	{
		LifecycleValue = null;
		LifecycleDescriptorAction = null;
		LifecycleDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Lifecycle(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor> configure)
	{
		LifecycleValue = null;
		LifecycleDescriptor = null;
		LifecycleDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> LoadFixedBitsetFiltersEagerly(bool? loadFixedBitsetFiltersEagerly = true)
	{
		LoadFixedBitsetFiltersEagerlyValue = loadFixedBitsetFiltersEagerly;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Enable or disable dynamic mapping for an index.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? mapping)
	{
		MappingDescriptor = null;
		MappingDescriptorAction = null;
		MappingValue = mapping;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor descriptor)
	{
		MappingValue = null;
		MappingDescriptorAction = null;
		MappingDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Mapping(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor> configure)
	{
		MappingValue = null;
		MappingDescriptor = null;
		MappingDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxDocvalueFieldsSearch(int? maxDocvalueFieldsSearch)
	{
		MaxDocvalueFieldsSearchValue = maxDocvalueFieldsSearch;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxInnerResultWindow(int? maxInnerResultWindow)
	{
		MaxInnerResultWindowValue = maxInnerResultWindow;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxNgramDiff(int? maxNgramDiff)
	{
		MaxNgramDiffValue = maxNgramDiff;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxRefreshListeners(int? maxRefreshListeners)
	{
		MaxRefreshListenersValue = maxRefreshListeners;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxRegexLength(int? maxRegexLength)
	{
		MaxRegexLengthValue = maxRegexLength;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxRescoreWindow(int? maxRescoreWindow)
	{
		MaxRescoreWindowValue = maxRescoreWindow;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxResultWindow(int? maxResultWindow)
	{
		MaxResultWindowValue = maxResultWindow;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxScriptFields(int? maxScriptFields)
	{
		MaxScriptFieldsValue = maxScriptFields;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxShingleDiff(int? maxShingleDiff)
	{
		MaxShingleDiffValue = maxShingleDiff;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxSlicesPerScroll(int? maxSlicesPerScroll)
	{
		MaxSlicesPerScrollValue = maxSlicesPerScroll;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> MaxTermsCount(int? maxTermsCount)
	{
		MaxTermsCountValue = maxTermsCount;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? merge)
	{
		MergeDescriptor = null;
		MergeDescriptorAction = null;
		MergeValue = merge;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor descriptor)
	{
		MergeValue = null;
		MergeDescriptorAction = null;
		MergeDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Merge(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor> configure)
	{
		MergeValue = null;
		MergeDescriptor = null;
		MergeDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Mode(string? mode)
	{
		ModeValue = mode;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> NumberOfReplicas(object? numberOfReplicas)
	{
		NumberOfReplicasValue = numberOfReplicas;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> NumberOfRoutingShards(int? numberOfRoutingShards)
	{
		NumberOfRoutingShardsValue = numberOfRoutingShards;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> NumberOfShards(object? numberOfShards)
	{
		NumberOfShardsValue = numberOfShards;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the <a href="https://github.com/elastic/elasticsearch-specification">Elasticsearch API specification</a> so that they can be added in a future release
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> OtherSettings(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector)
	{
		OtherSettingsValue = selector?.Invoke(new FluentDictionary<string, object>());
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Priority(object? priority)
	{
		PriorityValue = priority;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> ProvidedName(Elastic.Clients.Elasticsearch.Serverless.Name? providedName)
	{
		ProvidedNameValue = providedName;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? queries)
	{
		QueriesDescriptor = null;
		QueriesDescriptorAction = null;
		QueriesValue = queries;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor descriptor)
	{
		QueriesValue = null;
		QueriesDescriptorAction = null;
		QueriesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Queries(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor> configure)
	{
		QueriesValue = null;
		QueriesDescriptor = null;
		QueriesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? queryString)
	{
		QueryStringDescriptor = null;
		QueryStringDescriptorAction = null;
		QueryStringValue = queryString;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor descriptor)
	{
		QueryStringValue = null;
		QueryStringDescriptorAction = null;
		QueryStringDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> QueryString(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor> configure)
	{
		QueryStringValue = null;
		QueryStringDescriptor = null;
		QueryStringDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> RefreshInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? refreshInterval)
	{
		RefreshIntervalValue = refreshInterval;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? routing)
	{
		RoutingDescriptor = null;
		RoutingDescriptorAction = null;
		RoutingValue = routing;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor descriptor)
	{
		RoutingValue = null;
		RoutingDescriptorAction = null;
		RoutingDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Routing(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor> configure)
	{
		RoutingValue = null;
		RoutingDescriptor = null;
		RoutingDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> RoutingPartitionSize(int? routingPartitionSize)
	{
		RoutingPartitionSizeValue = routingPartitionSize;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> RoutingPath(ICollection<string>? routingPath)
	{
		RoutingPathValue = routingPath;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? search)
	{
		SearchDescriptor = null;
		SearchDescriptorAction = null;
		SearchValue = search;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor descriptor)
	{
		SearchValue = null;
		SearchDescriptorAction = null;
		SearchDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Search(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor> configure)
	{
		SearchValue = null;
		SearchDescriptor = null;
		SearchDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
	{
		SettingsDescriptor = null;
		SettingsDescriptorAction = null;
		SettingsValue = settings;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> descriptor)
	{
		SettingsValue = null;
		SettingsDescriptorAction = null;
		SettingsDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Settings(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> configure)
	{
		SettingsValue = null;
		SettingsDescriptor = null;
		SettingsDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Configure custom similarity settings to customize how search results are scored.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? similarity)
	{
		SimilarityValue = similarity;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor descriptor)
	{
		SimilarityValue = descriptor.PromisedValue;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Similarity(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor> configure)
	{
		var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor();
		configure?.Invoke(descriptor);
		SimilarityValue = descriptor.PromisedValue;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? softDeletes)
	{
		SoftDeletesDescriptor = null;
		SoftDeletesDescriptorAction = null;
		SoftDeletesValue = softDeletes;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor descriptor)
	{
		SoftDeletesValue = null;
		SoftDeletesDescriptorAction = null;
		SoftDeletesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> SoftDeletes(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor> configure)
	{
		SoftDeletesValue = null;
		SoftDeletesDescriptor = null;
		SoftDeletesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort)
	{
		SortDescriptor = null;
		SortDescriptorAction = null;
		SortValue = sort;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor<TDocument> descriptor)
	{
		SortValue = null;
		SortDescriptorAction = null;
		SortDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Sort(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor<TDocument>> configure)
	{
		SortValue = null;
		SortDescriptor = null;
		SortDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// The store module allows you to control how index data is stored and accessed on disk.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor<TDocument> Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? store)
	{
		StoreDescriptor = null;
		StoreDescriptorAction = null;
		StoreValue = store;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor descriptor)
	{
		StoreValue = null;
		StoreDescriptorAction = null;
		StoreDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Store(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor> configure)
	{
		StoreValue = null;
		StoreDescriptor = null;
		StoreDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? timeSeries)
	{
		TimeSeriesDescriptor = null;
		TimeSeriesDescriptorAction = null;
		TimeSeriesValue = timeSeries;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor descriptor)
	{
		TimeSeriesValue = null;
		TimeSeriesDescriptorAction = null;
		TimeSeriesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> TimeSeries(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor> configure)
	{
		TimeSeriesValue = null;
		TimeSeriesDescriptor = null;
		TimeSeriesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> TopMetricsMaxSize(int? topMetricsMaxSize)
	{
		TopMetricsMaxSizeValue = topMetricsMaxSize;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? translog)
	{
		TranslogDescriptor = null;
		TranslogDescriptorAction = null;
		TranslogValue = translog;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor descriptor)
	{
		TranslogValue = null;
		TranslogDescriptorAction = null;
		TranslogDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Translog(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor> configure)
	{
		TranslogValue = null;
		TranslogDescriptor = null;
		TranslogDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Uuid(string? uuid)
	{
		UuidValue = uuid;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> VerifiedBeforeClose(object? verifiedBeforeClose)
	{
		VerifiedBeforeCloseValue = verifiedBeforeClose;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? version)
	{
		VersionDescriptor = null;
		VersionDescriptorAction = null;
		VersionValue = version;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor descriptor)
	{
		VersionValue = null;
		VersionDescriptorAction = null;
		VersionDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor<TDocument> Version(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor> configure)
	{
		VersionValue = null;
		VersionDescriptor = null;
		VersionDescriptorAction = configure;
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
		writer.WriteStartObject();
		if (AnalysisDescriptor is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, AnalysisDescriptor, options);
		}
		else if (AnalysisDescriptorAction is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor(AnalysisDescriptorAction), options);
		}
		else if (AnalysisValue is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, AnalysisValue, options);
		}

		if (AnalyzeDescriptor is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, AnalyzeDescriptor, options);
		}
		else if (AnalyzeDescriptorAction is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor(AnalyzeDescriptorAction), options);
		}
		else if (AnalyzeValue is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, AnalyzeValue, options);
		}

		if (!string.IsNullOrEmpty(AutoExpandReplicasValue))
		{
			writer.WritePropertyName("auto_expand_replicas");
			writer.WriteStringValue(AutoExpandReplicasValue);
		}

		if (BlocksDescriptor is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, BlocksDescriptor, options);
		}
		else if (BlocksDescriptorAction is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor(BlocksDescriptorAction), options);
		}
		else if (BlocksValue is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, BlocksValue, options);
		}

		if (CheckOnStartupValue is not null)
		{
			writer.WritePropertyName("check_on_startup");
			JsonSerializer.Serialize(writer, CheckOnStartupValue, options);
		}

		if (!string.IsNullOrEmpty(CodecValue))
		{
			writer.WritePropertyName("codec");
			writer.WriteStringValue(CodecValue);
		}

		if (CreationDateValue.HasValue)
		{
			writer.WritePropertyName("creation_date");
			writer.WriteNumberValue(CreationDateValue.Value);
		}

		if (CreationDateStringValue is not null)
		{
			writer.WritePropertyName("creation_date_string");
			JsonSerializer.Serialize(writer, CreationDateStringValue, options);
		}

		if (!string.IsNullOrEmpty(DefaultPipelineValue))
		{
			writer.WritePropertyName("default_pipeline");
			writer.WriteStringValue(DefaultPipelineValue);
		}

		if (!string.IsNullOrEmpty(FinalPipelineValue))
		{
			writer.WritePropertyName("final_pipeline");
			writer.WriteStringValue(FinalPipelineValue);
		}

		if (FormatValue is not null)
		{
			writer.WritePropertyName("format");
			JsonSerializer.Serialize(writer, FormatValue, options);
		}

		if (GcDeletesValue is not null)
		{
			writer.WritePropertyName("gc_deletes");
			JsonSerializer.Serialize(writer, GcDeletesValue, options);
		}

		if (HiddenValue is not null)
		{
			writer.WritePropertyName("hidden");
			JsonSerializer.Serialize(writer, HiddenValue, options);
		}

		if (HighlightDescriptor is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, HighlightDescriptor, options);
		}
		else if (HighlightDescriptorAction is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor(HighlightDescriptorAction), options);
		}
		else if (HighlightValue is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, HighlightValue, options);
		}

		if (IndexDescriptor is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, IndexDescriptor, options);
		}
		else if (IndexDescriptorAction is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>(IndexDescriptorAction), options);
		}
		else if (IndexValue is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, IndexValue, options);
		}

		if (IndexingPressureDescriptor is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, IndexingPressureDescriptor, options);
		}
		else if (IndexingPressureDescriptorAction is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor(IndexingPressureDescriptorAction), options);
		}
		else if (IndexingPressureValue is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, IndexingPressureValue, options);
		}

		if (IndexingSlowlogDescriptor is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, IndexingSlowlogDescriptor, options);
		}
		else if (IndexingSlowlogDescriptorAction is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor(IndexingSlowlogDescriptorAction), options);
		}
		else if (IndexingSlowlogValue is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, IndexingSlowlogValue, options);
		}

		if (LifecycleDescriptor is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, LifecycleDescriptor, options);
		}
		else if (LifecycleDescriptorAction is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor(LifecycleDescriptorAction), options);
		}
		else if (LifecycleValue is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, LifecycleValue, options);
		}

		if (LoadFixedBitsetFiltersEagerlyValue.HasValue)
		{
			writer.WritePropertyName("load_fixed_bitset_filters_eagerly");
			writer.WriteBooleanValue(LoadFixedBitsetFiltersEagerlyValue.Value);
		}

		if (MappingDescriptor is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, MappingDescriptor, options);
		}
		else if (MappingDescriptorAction is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor(MappingDescriptorAction), options);
		}
		else if (MappingValue is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, MappingValue, options);
		}

		if (MaxDocvalueFieldsSearchValue.HasValue)
		{
			writer.WritePropertyName("max_docvalue_fields_search");
			writer.WriteNumberValue(MaxDocvalueFieldsSearchValue.Value);
		}

		if (MaxInnerResultWindowValue.HasValue)
		{
			writer.WritePropertyName("max_inner_result_window");
			writer.WriteNumberValue(MaxInnerResultWindowValue.Value);
		}

		if (MaxNgramDiffValue.HasValue)
		{
			writer.WritePropertyName("max_ngram_diff");
			writer.WriteNumberValue(MaxNgramDiffValue.Value);
		}

		if (MaxRefreshListenersValue.HasValue)
		{
			writer.WritePropertyName("max_refresh_listeners");
			writer.WriteNumberValue(MaxRefreshListenersValue.Value);
		}

		if (MaxRegexLengthValue.HasValue)
		{
			writer.WritePropertyName("max_regex_length");
			writer.WriteNumberValue(MaxRegexLengthValue.Value);
		}

		if (MaxRescoreWindowValue.HasValue)
		{
			writer.WritePropertyName("max_rescore_window");
			writer.WriteNumberValue(MaxRescoreWindowValue.Value);
		}

		if (MaxResultWindowValue.HasValue)
		{
			writer.WritePropertyName("max_result_window");
			writer.WriteNumberValue(MaxResultWindowValue.Value);
		}

		if (MaxScriptFieldsValue.HasValue)
		{
			writer.WritePropertyName("max_script_fields");
			writer.WriteNumberValue(MaxScriptFieldsValue.Value);
		}

		if (MaxShingleDiffValue.HasValue)
		{
			writer.WritePropertyName("max_shingle_diff");
			writer.WriteNumberValue(MaxShingleDiffValue.Value);
		}

		if (MaxSlicesPerScrollValue.HasValue)
		{
			writer.WritePropertyName("max_slices_per_scroll");
			writer.WriteNumberValue(MaxSlicesPerScrollValue.Value);
		}

		if (MaxTermsCountValue.HasValue)
		{
			writer.WritePropertyName("max_terms_count");
			writer.WriteNumberValue(MaxTermsCountValue.Value);
		}

		if (MergeDescriptor is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, MergeDescriptor, options);
		}
		else if (MergeDescriptorAction is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor(MergeDescriptorAction), options);
		}
		else if (MergeValue is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, MergeValue, options);
		}

		if (!string.IsNullOrEmpty(ModeValue))
		{
			writer.WritePropertyName("mode");
			writer.WriteStringValue(ModeValue);
		}

		if (NumberOfReplicasValue is not null)
		{
			writer.WritePropertyName("number_of_replicas");
			JsonSerializer.Serialize(writer, NumberOfReplicasValue, options);
		}

		if (NumberOfRoutingShardsValue.HasValue)
		{
			writer.WritePropertyName("number_of_routing_shards");
			writer.WriteNumberValue(NumberOfRoutingShardsValue.Value);
		}

		if (NumberOfShardsValue is not null)
		{
			writer.WritePropertyName("number_of_shards");
			JsonSerializer.Serialize(writer, NumberOfShardsValue, options);
		}

		if (PriorityValue is not null)
		{
			writer.WritePropertyName("priority");
			JsonSerializer.Serialize(writer, PriorityValue, options);
		}

		if (ProvidedNameValue is not null)
		{
			writer.WritePropertyName("provided_name");
			JsonSerializer.Serialize(writer, ProvidedNameValue, options);
		}

		if (QueriesDescriptor is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, QueriesDescriptor, options);
		}
		else if (QueriesDescriptorAction is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor(QueriesDescriptorAction), options);
		}
		else if (QueriesValue is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, QueriesValue, options);
		}

		if (QueryStringDescriptor is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, QueryStringDescriptor, options);
		}
		else if (QueryStringDescriptorAction is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor(QueryStringDescriptorAction), options);
		}
		else if (QueryStringValue is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, QueryStringValue, options);
		}

		if (RefreshIntervalValue is not null)
		{
			writer.WritePropertyName("refresh_interval");
			JsonSerializer.Serialize(writer, RefreshIntervalValue, options);
		}

		if (RoutingDescriptor is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, RoutingDescriptor, options);
		}
		else if (RoutingDescriptorAction is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor(RoutingDescriptorAction), options);
		}
		else if (RoutingValue is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, RoutingValue, options);
		}

		if (RoutingPartitionSizeValue.HasValue)
		{
			writer.WritePropertyName("routing_partition_size");
			writer.WriteNumberValue(RoutingPartitionSizeValue.Value);
		}

		if (RoutingPathValue is not null)
		{
			writer.WritePropertyName("routing_path");
			SingleOrManySerializationHelper.Serialize<string>(RoutingPathValue, writer, options);
		}

		if (SearchDescriptor is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, SearchDescriptor, options);
		}
		else if (SearchDescriptorAction is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor(SearchDescriptorAction), options);
		}
		else if (SearchValue is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, SearchValue, options);
		}

		if (SettingsDescriptor is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, SettingsDescriptor, options);
		}
		else if (SettingsDescriptorAction is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>(SettingsDescriptorAction), options);
		}
		else if (SettingsValue is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, SettingsValue, options);
		}

		if (SimilarityValue is not null)
		{
			writer.WritePropertyName("similarity");
			JsonSerializer.Serialize(writer, SimilarityValue, options);
		}

		if (SoftDeletesDescriptor is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, SoftDeletesDescriptor, options);
		}
		else if (SoftDeletesDescriptorAction is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor(SoftDeletesDescriptorAction), options);
		}
		else if (SoftDeletesValue is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, SoftDeletesValue, options);
		}

		if (SortDescriptor is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, SortDescriptor, options);
		}
		else if (SortDescriptorAction is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor<TDocument>(SortDescriptorAction), options);
		}
		else if (SortValue is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, SortValue, options);
		}

		if (StoreDescriptor is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, StoreDescriptor, options);
		}
		else if (StoreDescriptorAction is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor(StoreDescriptorAction), options);
		}
		else if (StoreValue is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, StoreValue, options);
		}

		if (TimeSeriesDescriptor is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, TimeSeriesDescriptor, options);
		}
		else if (TimeSeriesDescriptorAction is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor(TimeSeriesDescriptorAction), options);
		}
		else if (TimeSeriesValue is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, TimeSeriesValue, options);
		}

		if (TopMetricsMaxSizeValue.HasValue)
		{
			writer.WritePropertyName("top_metrics_max_size");
			writer.WriteNumberValue(TopMetricsMaxSizeValue.Value);
		}

		if (TranslogDescriptor is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, TranslogDescriptor, options);
		}
		else if (TranslogDescriptorAction is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor(TranslogDescriptorAction), options);
		}
		else if (TranslogValue is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, TranslogValue, options);
		}

		if (!string.IsNullOrEmpty(UuidValue))
		{
			writer.WritePropertyName("uuid");
			writer.WriteStringValue(UuidValue);
		}

		if (VerifiedBeforeCloseValue is not null)
		{
			writer.WritePropertyName("verified_before_close");
			JsonSerializer.Serialize(writer, VerifiedBeforeCloseValue, options);
		}

		if (VersionDescriptor is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, VersionDescriptor, options);
		}
		else if (VersionDescriptorAction is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor(VersionDescriptorAction), options);
		}
		else if (VersionValue is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, VersionValue, options);
		}

		if (OtherSettingsValue is not null)
		{
			foreach (var additionalProperty in OtherSettingsValue)
			{
				writer.WritePropertyName(additionalProperty.Key);
				JsonSerializer.Serialize(writer, additionalProperty.Value, options);
			}
		}

		writer.WriteEndObject();
	}
}

/// <summary>
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-modules.html#index-modules-settings">Learn more about this API in the Elasticsearch documentation.</see></para>
/// </summary>
public sealed partial class IndexSettingsDescriptor : SerializableDescriptor<IndexSettingsDescriptor>
{
	internal IndexSettingsDescriptor(Action<IndexSettingsDescriptor> configure) => configure.Invoke(this);

	public IndexSettingsDescriptor() : base()
	{
	}

	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? AnalysisValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor AnalysisDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor> AnalysisDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? AnalyzeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor AnalyzeDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor> AnalyzeDescriptorAction { get; set; }
	private string? AutoExpandReplicasValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? BlocksValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor BlocksDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor> BlocksDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? CheckOnStartupValue { get; set; }
	private string? CodecValue { get; set; }
	private long? CreationDateValue { get; set; }
	private DateTimeOffset? CreationDateStringValue { get; set; }
	private string? DefaultPipelineValue { get; set; }
	private string? FinalPipelineValue { get; set; }
	private object? FormatValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Duration? GcDeletesValue { get; set; }
	private object? HiddenValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? HighlightValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor HighlightDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor> HighlightDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? IndexValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor IndexDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> IndexDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? IndexingPressureValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor IndexingPressureDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor> IndexingPressureDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? IndexingSlowlogValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor IndexingSlowlogDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor> IndexingSlowlogDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? LifecycleValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor LifecycleDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor> LifecycleDescriptorAction { get; set; }
	private bool? LoadFixedBitsetFiltersEagerlyValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? MappingValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor MappingDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor> MappingDescriptorAction { get; set; }
	private int? MaxDocvalueFieldsSearchValue { get; set; }
	private int? MaxInnerResultWindowValue { get; set; }
	private int? MaxNgramDiffValue { get; set; }
	private int? MaxRefreshListenersValue { get; set; }
	private int? MaxRegexLengthValue { get; set; }
	private int? MaxRescoreWindowValue { get; set; }
	private int? MaxResultWindowValue { get; set; }
	private int? MaxScriptFieldsValue { get; set; }
	private int? MaxShingleDiffValue { get; set; }
	private int? MaxSlicesPerScrollValue { get; set; }
	private int? MaxTermsCountValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? MergeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor MergeDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor> MergeDescriptorAction { get; set; }
	private string? ModeValue { get; set; }
	private object? NumberOfReplicasValue { get; set; }
	private int? NumberOfRoutingShardsValue { get; set; }
	private object? NumberOfShardsValue { get; set; }
	private IDictionary<string, object> OtherSettingsValue { get; set; }
	private object? PriorityValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Name? ProvidedNameValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? QueriesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor QueriesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor> QueriesDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? QueryStringValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor QueryStringDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor> QueryStringDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.Duration? RefreshIntervalValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? RoutingValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor RoutingDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor> RoutingDescriptorAction { get; set; }
	private int? RoutingPartitionSizeValue { get; set; }
	private ICollection<string>? RoutingPathValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? SearchValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor SearchDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor> SearchDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> SettingsDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? SimilarityValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? SoftDeletesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor SoftDeletesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor> SoftDeletesDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? SortValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor SortDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor> SortDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? StoreValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor StoreDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor> StoreDescriptorAction { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? TimeSeriesValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor TimeSeriesDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor> TimeSeriesDescriptorAction { get; set; }
	private int? TopMetricsMaxSizeValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? TranslogValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor TranslogDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor> TranslogDescriptorAction { get; set; }
	private string? UuidValue { get; set; }
	private object? VerifiedBeforeCloseValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? VersionValue { get; set; }
	private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor VersionDescriptor { get; set; }
	private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor> VersionDescriptorAction { get; set; }

	public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysis? analysis)
	{
		AnalysisDescriptor = null;
		AnalysisDescriptorAction = null;
		AnalysisValue = analysis;
		return Self;
	}

	public IndexSettingsDescriptor Analysis(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor descriptor)
	{
		AnalysisValue = null;
		AnalysisDescriptorAction = null;
		AnalysisDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Analysis(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor> configure)
	{
		AnalysisValue = null;
		AnalysisDescriptor = null;
		AnalysisDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Settings to define analyzers, tokenizers, token filters and character filters.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyze? analyze)
	{
		AnalyzeDescriptor = null;
		AnalyzeDescriptorAction = null;
		AnalyzeValue = analyze;
		return Self;
	}

	public IndexSettingsDescriptor Analyze(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor descriptor)
	{
		AnalyzeValue = null;
		AnalyzeDescriptorAction = null;
		AnalyzeDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Analyze(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor> configure)
	{
		AnalyzeValue = null;
		AnalyzeDescriptor = null;
		AnalyzeDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor AutoExpandReplicas(string? autoExpandReplicas)
	{
		AutoExpandReplicasValue = autoExpandReplicas;
		return Self;
	}

	public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocks? blocks)
	{
		BlocksDescriptor = null;
		BlocksDescriptorAction = null;
		BlocksValue = blocks;
		return Self;
	}

	public IndexSettingsDescriptor Blocks(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor descriptor)
	{
		BlocksValue = null;
		BlocksDescriptorAction = null;
		BlocksDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Blocks(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor> configure)
	{
		BlocksValue = null;
		BlocksDescriptor = null;
		BlocksDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor CheckOnStartup(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexCheckOnStartup? checkOnStartup)
	{
		CheckOnStartupValue = checkOnStartup;
		return Self;
	}

	public IndexSettingsDescriptor Codec(string? codec)
	{
		CodecValue = codec;
		return Self;
	}

	public IndexSettingsDescriptor CreationDate(long? creationDate)
	{
		CreationDateValue = creationDate;
		return Self;
	}

	public IndexSettingsDescriptor CreationDateString(DateTimeOffset? creationDateString)
	{
		CreationDateStringValue = creationDateString;
		return Self;
	}

	public IndexSettingsDescriptor DefaultPipeline(string? defaultPipeline)
	{
		DefaultPipelineValue = defaultPipeline;
		return Self;
	}

	public IndexSettingsDescriptor FinalPipeline(string? finalPipeline)
	{
		FinalPipelineValue = finalPipeline;
		return Self;
	}

	public IndexSettingsDescriptor Format(object? format)
	{
		FormatValue = format;
		return Self;
	}

	public IndexSettingsDescriptor GcDeletes(Elastic.Clients.Elasticsearch.Serverless.Duration? gcDeletes)
	{
		GcDeletesValue = gcDeletes;
		return Self;
	}

	public IndexSettingsDescriptor Hidden(object? hidden)
	{
		HiddenValue = hidden;
		return Self;
	}

	public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlight? highlight)
	{
		HighlightDescriptor = null;
		HighlightDescriptorAction = null;
		HighlightValue = highlight;
		return Self;
	}

	public IndexSettingsDescriptor Highlight(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor descriptor)
	{
		HighlightValue = null;
		HighlightDescriptorAction = null;
		HighlightDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Highlight(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor> configure)
	{
		HighlightValue = null;
		HighlightDescriptor = null;
		HighlightDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? index)
	{
		IndexDescriptor = null;
		IndexDescriptorAction = null;
		IndexValue = index;
		return Self;
	}

	public IndexSettingsDescriptor Index(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor)
	{
		IndexValue = null;
		IndexDescriptorAction = null;
		IndexDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Index(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> configure)
	{
		IndexValue = null;
		IndexDescriptor = null;
		IndexDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Configure indexing back pressure limits.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressure? indexingPressure)
	{
		IndexingPressureDescriptor = null;
		IndexingPressureDescriptorAction = null;
		IndexingPressureValue = indexingPressure;
		return Self;
	}

	public IndexSettingsDescriptor IndexingPressure(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor descriptor)
	{
		IndexingPressureValue = null;
		IndexingPressureDescriptorAction = null;
		IndexingPressureDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor IndexingPressure(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor> configure)
	{
		IndexingPressureValue = null;
		IndexingPressureDescriptor = null;
		IndexingPressureDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettings? indexingSlowlog)
	{
		IndexingSlowlogDescriptor = null;
		IndexingSlowlogDescriptorAction = null;
		IndexingSlowlogValue = indexingSlowlog;
		return Self;
	}

	public IndexSettingsDescriptor IndexingSlowlog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor descriptor)
	{
		IndexingSlowlogValue = null;
		IndexingSlowlogDescriptorAction = null;
		IndexingSlowlogDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor IndexingSlowlog(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor> configure)
	{
		IndexingSlowlogValue = null;
		IndexingSlowlogDescriptor = null;
		IndexingSlowlogDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycle? lifecycle)
	{
		LifecycleDescriptor = null;
		LifecycleDescriptorAction = null;
		LifecycleValue = lifecycle;
		return Self;
	}

	public IndexSettingsDescriptor Lifecycle(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor descriptor)
	{
		LifecycleValue = null;
		LifecycleDescriptorAction = null;
		LifecycleDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Lifecycle(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor> configure)
	{
		LifecycleValue = null;
		LifecycleDescriptor = null;
		LifecycleDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor LoadFixedBitsetFiltersEagerly(bool? loadFixedBitsetFiltersEagerly = true)
	{
		LoadFixedBitsetFiltersEagerlyValue = loadFixedBitsetFiltersEagerly;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Enable or disable dynamic mapping for an index.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettings? mapping)
	{
		MappingDescriptor = null;
		MappingDescriptorAction = null;
		MappingValue = mapping;
		return Self;
	}

	public IndexSettingsDescriptor Mapping(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor descriptor)
	{
		MappingValue = null;
		MappingDescriptorAction = null;
		MappingDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Mapping(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor> configure)
	{
		MappingValue = null;
		MappingDescriptor = null;
		MappingDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor MaxDocvalueFieldsSearch(int? maxDocvalueFieldsSearch)
	{
		MaxDocvalueFieldsSearchValue = maxDocvalueFieldsSearch;
		return Self;
	}

	public IndexSettingsDescriptor MaxInnerResultWindow(int? maxInnerResultWindow)
	{
		MaxInnerResultWindowValue = maxInnerResultWindow;
		return Self;
	}

	public IndexSettingsDescriptor MaxNgramDiff(int? maxNgramDiff)
	{
		MaxNgramDiffValue = maxNgramDiff;
		return Self;
	}

	public IndexSettingsDescriptor MaxRefreshListeners(int? maxRefreshListeners)
	{
		MaxRefreshListenersValue = maxRefreshListeners;
		return Self;
	}

	public IndexSettingsDescriptor MaxRegexLength(int? maxRegexLength)
	{
		MaxRegexLengthValue = maxRegexLength;
		return Self;
	}

	public IndexSettingsDescriptor MaxRescoreWindow(int? maxRescoreWindow)
	{
		MaxRescoreWindowValue = maxRescoreWindow;
		return Self;
	}

	public IndexSettingsDescriptor MaxResultWindow(int? maxResultWindow)
	{
		MaxResultWindowValue = maxResultWindow;
		return Self;
	}

	public IndexSettingsDescriptor MaxScriptFields(int? maxScriptFields)
	{
		MaxScriptFieldsValue = maxScriptFields;
		return Self;
	}

	public IndexSettingsDescriptor MaxShingleDiff(int? maxShingleDiff)
	{
		MaxShingleDiffValue = maxShingleDiff;
		return Self;
	}

	public IndexSettingsDescriptor MaxSlicesPerScroll(int? maxSlicesPerScroll)
	{
		MaxSlicesPerScrollValue = maxSlicesPerScroll;
		return Self;
	}

	public IndexSettingsDescriptor MaxTermsCount(int? maxTermsCount)
	{
		MaxTermsCountValue = maxTermsCount;
		return Self;
	}

	public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Merge? merge)
	{
		MergeDescriptor = null;
		MergeDescriptorAction = null;
		MergeValue = merge;
		return Self;
	}

	public IndexSettingsDescriptor Merge(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor descriptor)
	{
		MergeValue = null;
		MergeDescriptorAction = null;
		MergeDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Merge(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor> configure)
	{
		MergeValue = null;
		MergeDescriptor = null;
		MergeDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Mode(string? mode)
	{
		ModeValue = mode;
		return Self;
	}

	public IndexSettingsDescriptor NumberOfReplicas(object? numberOfReplicas)
	{
		NumberOfReplicasValue = numberOfReplicas;
		return Self;
	}

	public IndexSettingsDescriptor NumberOfRoutingShards(int? numberOfRoutingShards)
	{
		NumberOfRoutingShardsValue = numberOfRoutingShards;
		return Self;
	}

	public IndexSettingsDescriptor NumberOfShards(object? numberOfShards)
	{
		NumberOfShardsValue = numberOfShards;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Additional settings not covered in this type. Unless these settings are defined by a plugin, please open an issue on the <a href="https://github.com/elastic/elasticsearch-specification">Elasticsearch API specification</a> so that they can be added in a future release
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor OtherSettings(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector)
	{
		OtherSettingsValue = selector?.Invoke(new FluentDictionary<string, object>());
		return Self;
	}

	public IndexSettingsDescriptor Priority(object? priority)
	{
		PriorityValue = priority;
		return Self;
	}

	public IndexSettingsDescriptor ProvidedName(Elastic.Clients.Elasticsearch.Serverless.Name? providedName)
	{
		ProvidedNameValue = providedName;
		return Self;
	}

	public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Queries? queries)
	{
		QueriesDescriptor = null;
		QueriesDescriptorAction = null;
		QueriesValue = queries;
		return Self;
	}

	public IndexSettingsDescriptor Queries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor descriptor)
	{
		QueriesValue = null;
		QueriesDescriptorAction = null;
		QueriesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Queries(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor> configure)
	{
		QueriesValue = null;
		QueriesDescriptor = null;
		QueriesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryString? queryString)
	{
		QueryStringDescriptor = null;
		QueryStringDescriptorAction = null;
		QueryStringValue = queryString;
		return Self;
	}

	public IndexSettingsDescriptor QueryString(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor descriptor)
	{
		QueryStringValue = null;
		QueryStringDescriptorAction = null;
		QueryStringDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor QueryString(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor> configure)
	{
		QueryStringValue = null;
		QueryStringDescriptor = null;
		QueryStringDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor RefreshInterval(Elastic.Clients.Elasticsearch.Serverless.Duration? refreshInterval)
	{
		RefreshIntervalValue = refreshInterval;
		return Self;
	}

	public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRouting? routing)
	{
		RoutingDescriptor = null;
		RoutingDescriptorAction = null;
		RoutingValue = routing;
		return Self;
	}

	public IndexSettingsDescriptor Routing(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor descriptor)
	{
		RoutingValue = null;
		RoutingDescriptorAction = null;
		RoutingDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Routing(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor> configure)
	{
		RoutingValue = null;
		RoutingDescriptor = null;
		RoutingDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor RoutingPartitionSize(int? routingPartitionSize)
	{
		RoutingPartitionSizeValue = routingPartitionSize;
		return Self;
	}

	public IndexSettingsDescriptor RoutingPath(ICollection<string>? routingPath)
	{
		RoutingPathValue = routingPath;
		return Self;
	}

	public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearch? search)
	{
		SearchDescriptor = null;
		SearchDescriptorAction = null;
		SearchValue = search;
		return Self;
	}

	public IndexSettingsDescriptor Search(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor descriptor)
	{
		SearchValue = null;
		SearchDescriptorAction = null;
		SearchDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Search(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor> configure)
	{
		SearchValue = null;
		SearchDescriptor = null;
		SearchDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
	{
		SettingsDescriptor = null;
		SettingsDescriptorAction = null;
		SettingsValue = settings;
		return Self;
	}

	public IndexSettingsDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor)
	{
		SettingsValue = null;
		SettingsDescriptorAction = null;
		SettingsDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Settings(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> configure)
	{
		SettingsValue = null;
		SettingsDescriptor = null;
		SettingsDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// Configure custom similarity settings to customize how search results are scored.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilarities? similarity)
	{
		SimilarityValue = similarity;
		return Self;
	}

	public IndexSettingsDescriptor Similarity(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor descriptor)
	{
		SimilarityValue = descriptor.PromisedValue;
		return Self;
	}

	public IndexSettingsDescriptor Similarity(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor> configure)
	{
		var descriptor = new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSimilaritiesDescriptor();
		configure?.Invoke(descriptor);
		SimilarityValue = descriptor.PromisedValue;
		return Self;
	}

	public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletes? softDeletes)
	{
		SoftDeletesDescriptor = null;
		SoftDeletesDescriptorAction = null;
		SoftDeletesValue = softDeletes;
		return Self;
	}

	public IndexSettingsDescriptor SoftDeletes(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor descriptor)
	{
		SoftDeletesValue = null;
		SoftDeletesDescriptorAction = null;
		SoftDeletesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor SoftDeletes(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor> configure)
	{
		SoftDeletesValue = null;
		SoftDeletesDescriptor = null;
		SoftDeletesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSort? sort)
	{
		SortDescriptor = null;
		SortDescriptorAction = null;
		SortValue = sort;
		return Self;
	}

	public IndexSettingsDescriptor Sort(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor descriptor)
	{
		SortValue = null;
		SortDescriptorAction = null;
		SortDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Sort(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor> configure)
	{
		SortValue = null;
		SortDescriptor = null;
		SortDescriptorAction = configure;
		return Self;
	}

	/// <summary>
	/// <para>
	/// The store module allows you to control how index data is stored and accessed on disk.
	/// </para>
	/// </summary>
	public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Storage? store)
	{
		StoreDescriptor = null;
		StoreDescriptorAction = null;
		StoreValue = store;
		return Self;
	}

	public IndexSettingsDescriptor Store(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor descriptor)
	{
		StoreValue = null;
		StoreDescriptorAction = null;
		StoreDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Store(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor> configure)
	{
		StoreValue = null;
		StoreDescriptor = null;
		StoreDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeries? timeSeries)
	{
		TimeSeriesDescriptor = null;
		TimeSeriesDescriptorAction = null;
		TimeSeriesValue = timeSeries;
		return Self;
	}

	public IndexSettingsDescriptor TimeSeries(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor descriptor)
	{
		TimeSeriesValue = null;
		TimeSeriesDescriptorAction = null;
		TimeSeriesDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor TimeSeries(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor> configure)
	{
		TimeSeriesValue = null;
		TimeSeriesDescriptor = null;
		TimeSeriesDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor TopMetricsMaxSize(int? topMetricsMaxSize)
	{
		TopMetricsMaxSizeValue = topMetricsMaxSize;
		return Self;
	}

	public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.Translog? translog)
	{
		TranslogDescriptor = null;
		TranslogDescriptorAction = null;
		TranslogValue = translog;
		return Self;
	}

	public IndexSettingsDescriptor Translog(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor descriptor)
	{
		TranslogValue = null;
		TranslogDescriptorAction = null;
		TranslogDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Translog(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor> configure)
	{
		TranslogValue = null;
		TranslogDescriptor = null;
		TranslogDescriptorAction = configure;
		return Self;
	}

	public IndexSettingsDescriptor Uuid(string? uuid)
	{
		UuidValue = uuid;
		return Self;
	}

	public IndexSettingsDescriptor VerifiedBeforeClose(object? verifiedBeforeClose)
	{
		VerifiedBeforeCloseValue = verifiedBeforeClose;
		return Self;
	}

	public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioning? version)
	{
		VersionDescriptor = null;
		VersionDescriptorAction = null;
		VersionValue = version;
		return Self;
	}

	public IndexSettingsDescriptor Version(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor descriptor)
	{
		VersionValue = null;
		VersionDescriptorAction = null;
		VersionDescriptor = descriptor;
		return Self;
	}

	public IndexSettingsDescriptor Version(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor> configure)
	{
		VersionValue = null;
		VersionDescriptor = null;
		VersionDescriptorAction = configure;
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
		writer.WriteStartObject();
		if (AnalysisDescriptor is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, AnalysisDescriptor, options);
		}
		else if (AnalysisDescriptorAction is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsAnalysisDescriptor(AnalysisDescriptorAction), options);
		}
		else if (AnalysisValue is not null)
		{
			writer.WritePropertyName("analysis");
			JsonSerializer.Serialize(writer, AnalysisValue, options);
		}

		if (AnalyzeDescriptor is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, AnalyzeDescriptor, options);
		}
		else if (AnalyzeDescriptorAction is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsAnalyzeDescriptor(AnalyzeDescriptorAction), options);
		}
		else if (AnalyzeValue is not null)
		{
			writer.WritePropertyName("analyze");
			JsonSerializer.Serialize(writer, AnalyzeValue, options);
		}

		if (!string.IsNullOrEmpty(AutoExpandReplicasValue))
		{
			writer.WritePropertyName("auto_expand_replicas");
			writer.WriteStringValue(AutoExpandReplicasValue);
		}

		if (BlocksDescriptor is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, BlocksDescriptor, options);
		}
		else if (BlocksDescriptorAction is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingBlocksDescriptor(BlocksDescriptorAction), options);
		}
		else if (BlocksValue is not null)
		{
			writer.WritePropertyName("blocks");
			JsonSerializer.Serialize(writer, BlocksValue, options);
		}

		if (CheckOnStartupValue is not null)
		{
			writer.WritePropertyName("check_on_startup");
			JsonSerializer.Serialize(writer, CheckOnStartupValue, options);
		}

		if (!string.IsNullOrEmpty(CodecValue))
		{
			writer.WritePropertyName("codec");
			writer.WriteStringValue(CodecValue);
		}

		if (CreationDateValue.HasValue)
		{
			writer.WritePropertyName("creation_date");
			writer.WriteNumberValue(CreationDateValue.Value);
		}

		if (CreationDateStringValue is not null)
		{
			writer.WritePropertyName("creation_date_string");
			JsonSerializer.Serialize(writer, CreationDateStringValue, options);
		}

		if (!string.IsNullOrEmpty(DefaultPipelineValue))
		{
			writer.WritePropertyName("default_pipeline");
			writer.WriteStringValue(DefaultPipelineValue);
		}

		if (!string.IsNullOrEmpty(FinalPipelineValue))
		{
			writer.WritePropertyName("final_pipeline");
			writer.WriteStringValue(FinalPipelineValue);
		}

		if (FormatValue is not null)
		{
			writer.WritePropertyName("format");
			JsonSerializer.Serialize(writer, FormatValue, options);
		}

		if (GcDeletesValue is not null)
		{
			writer.WritePropertyName("gc_deletes");
			JsonSerializer.Serialize(writer, GcDeletesValue, options);
		}

		if (HiddenValue is not null)
		{
			writer.WritePropertyName("hidden");
			JsonSerializer.Serialize(writer, HiddenValue, options);
		}

		if (HighlightDescriptor is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, HighlightDescriptor, options);
		}
		else if (HighlightDescriptorAction is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsHighlightDescriptor(HighlightDescriptorAction), options);
		}
		else if (HighlightValue is not null)
		{
			writer.WritePropertyName("highlight");
			JsonSerializer.Serialize(writer, HighlightValue, options);
		}

		if (IndexDescriptor is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, IndexDescriptor, options);
		}
		else if (IndexDescriptorAction is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(IndexDescriptorAction), options);
		}
		else if (IndexValue is not null)
		{
			writer.WritePropertyName("index");
			JsonSerializer.Serialize(writer, IndexValue, options);
		}

		if (IndexingPressureDescriptor is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, IndexingPressureDescriptor, options);
		}
		else if (IndexingPressureDescriptorAction is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingPressureDescriptor(IndexingPressureDescriptorAction), options);
		}
		else if (IndexingPressureValue is not null)
		{
			writer.WritePropertyName("indexing_pressure");
			JsonSerializer.Serialize(writer, IndexingPressureValue, options);
		}

		if (IndexingSlowlogDescriptor is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, IndexingSlowlogDescriptor, options);
		}
		else if (IndexingSlowlogDescriptorAction is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexingSlowlogSettingsDescriptor(IndexingSlowlogDescriptorAction), options);
		}
		else if (IndexingSlowlogValue is not null)
		{
			writer.WritePropertyName("indexing.slowlog");
			JsonSerializer.Serialize(writer, IndexingSlowlogValue, options);
		}

		if (LifecycleDescriptor is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, LifecycleDescriptor, options);
		}
		else if (LifecycleDescriptorAction is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsLifecycleDescriptor(LifecycleDescriptorAction), options);
		}
		else if (LifecycleValue is not null)
		{
			writer.WritePropertyName("lifecycle");
			JsonSerializer.Serialize(writer, LifecycleValue, options);
		}

		if (LoadFixedBitsetFiltersEagerlyValue.HasValue)
		{
			writer.WritePropertyName("load_fixed_bitset_filters_eagerly");
			writer.WriteBooleanValue(LoadFixedBitsetFiltersEagerlyValue.Value);
		}

		if (MappingDescriptor is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, MappingDescriptor, options);
		}
		else if (MappingDescriptorAction is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MappingLimitSettingsDescriptor(MappingDescriptorAction), options);
		}
		else if (MappingValue is not null)
		{
			writer.WritePropertyName("mapping");
			JsonSerializer.Serialize(writer, MappingValue, options);
		}

		if (MaxDocvalueFieldsSearchValue.HasValue)
		{
			writer.WritePropertyName("max_docvalue_fields_search");
			writer.WriteNumberValue(MaxDocvalueFieldsSearchValue.Value);
		}

		if (MaxInnerResultWindowValue.HasValue)
		{
			writer.WritePropertyName("max_inner_result_window");
			writer.WriteNumberValue(MaxInnerResultWindowValue.Value);
		}

		if (MaxNgramDiffValue.HasValue)
		{
			writer.WritePropertyName("max_ngram_diff");
			writer.WriteNumberValue(MaxNgramDiffValue.Value);
		}

		if (MaxRefreshListenersValue.HasValue)
		{
			writer.WritePropertyName("max_refresh_listeners");
			writer.WriteNumberValue(MaxRefreshListenersValue.Value);
		}

		if (MaxRegexLengthValue.HasValue)
		{
			writer.WritePropertyName("max_regex_length");
			writer.WriteNumberValue(MaxRegexLengthValue.Value);
		}

		if (MaxRescoreWindowValue.HasValue)
		{
			writer.WritePropertyName("max_rescore_window");
			writer.WriteNumberValue(MaxRescoreWindowValue.Value);
		}

		if (MaxResultWindowValue.HasValue)
		{
			writer.WritePropertyName("max_result_window");
			writer.WriteNumberValue(MaxResultWindowValue.Value);
		}

		if (MaxScriptFieldsValue.HasValue)
		{
			writer.WritePropertyName("max_script_fields");
			writer.WriteNumberValue(MaxScriptFieldsValue.Value);
		}

		if (MaxShingleDiffValue.HasValue)
		{
			writer.WritePropertyName("max_shingle_diff");
			writer.WriteNumberValue(MaxShingleDiffValue.Value);
		}

		if (MaxSlicesPerScrollValue.HasValue)
		{
			writer.WritePropertyName("max_slices_per_scroll");
			writer.WriteNumberValue(MaxSlicesPerScrollValue.Value);
		}

		if (MaxTermsCountValue.HasValue)
		{
			writer.WritePropertyName("max_terms_count");
			writer.WriteNumberValue(MaxTermsCountValue.Value);
		}

		if (MergeDescriptor is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, MergeDescriptor, options);
		}
		else if (MergeDescriptorAction is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.MergeDescriptor(MergeDescriptorAction), options);
		}
		else if (MergeValue is not null)
		{
			writer.WritePropertyName("merge");
			JsonSerializer.Serialize(writer, MergeValue, options);
		}

		if (!string.IsNullOrEmpty(ModeValue))
		{
			writer.WritePropertyName("mode");
			writer.WriteStringValue(ModeValue);
		}

		if (NumberOfReplicasValue is not null)
		{
			writer.WritePropertyName("number_of_replicas");
			JsonSerializer.Serialize(writer, NumberOfReplicasValue, options);
		}

		if (NumberOfRoutingShardsValue.HasValue)
		{
			writer.WritePropertyName("number_of_routing_shards");
			writer.WriteNumberValue(NumberOfRoutingShardsValue.Value);
		}

		if (NumberOfShardsValue is not null)
		{
			writer.WritePropertyName("number_of_shards");
			JsonSerializer.Serialize(writer, NumberOfShardsValue, options);
		}

		if (PriorityValue is not null)
		{
			writer.WritePropertyName("priority");
			JsonSerializer.Serialize(writer, PriorityValue, options);
		}

		if (ProvidedNameValue is not null)
		{
			writer.WritePropertyName("provided_name");
			JsonSerializer.Serialize(writer, ProvidedNameValue, options);
		}

		if (QueriesDescriptor is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, QueriesDescriptor, options);
		}
		else if (QueriesDescriptorAction is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.QueriesDescriptor(QueriesDescriptorAction), options);
		}
		else if (QueriesValue is not null)
		{
			writer.WritePropertyName("queries");
			JsonSerializer.Serialize(writer, QueriesValue, options);
		}

		if (QueryStringDescriptor is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, QueryStringDescriptor, options);
		}
		else if (QueryStringDescriptorAction is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsQueryStringDescriptor(QueryStringDescriptorAction), options);
		}
		else if (QueryStringValue is not null)
		{
			writer.WritePropertyName("query_string");
			JsonSerializer.Serialize(writer, QueryStringValue, options);
		}

		if (RefreshIntervalValue is not null)
		{
			writer.WritePropertyName("refresh_interval");
			JsonSerializer.Serialize(writer, RefreshIntervalValue, options);
		}

		if (RoutingDescriptor is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, RoutingDescriptor, options);
		}
		else if (RoutingDescriptorAction is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexRoutingDescriptor(RoutingDescriptorAction), options);
		}
		else if (RoutingValue is not null)
		{
			writer.WritePropertyName("routing");
			JsonSerializer.Serialize(writer, RoutingValue, options);
		}

		if (RoutingPartitionSizeValue.HasValue)
		{
			writer.WritePropertyName("routing_partition_size");
			writer.WriteNumberValue(RoutingPartitionSizeValue.Value);
		}

		if (RoutingPathValue is not null)
		{
			writer.WritePropertyName("routing_path");
			SingleOrManySerializationHelper.Serialize<string>(RoutingPathValue, writer, options);
		}

		if (SearchDescriptor is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, SearchDescriptor, options);
		}
		else if (SearchDescriptorAction is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SettingsSearchDescriptor(SearchDescriptorAction), options);
		}
		else if (SearchValue is not null)
		{
			writer.WritePropertyName("search");
			JsonSerializer.Serialize(writer, SearchValue, options);
		}

		if (SettingsDescriptor is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, SettingsDescriptor, options);
		}
		else if (SettingsDescriptorAction is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
		}
		else if (SettingsValue is not null)
		{
			writer.WritePropertyName("settings");
			JsonSerializer.Serialize(writer, SettingsValue, options);
		}

		if (SimilarityValue is not null)
		{
			writer.WritePropertyName("similarity");
			JsonSerializer.Serialize(writer, SimilarityValue, options);
		}

		if (SoftDeletesDescriptor is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, SoftDeletesDescriptor, options);
		}
		else if (SoftDeletesDescriptorAction is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.SoftDeletesDescriptor(SoftDeletesDescriptorAction), options);
		}
		else if (SoftDeletesValue is not null)
		{
			writer.WritePropertyName("soft_deletes");
			JsonSerializer.Serialize(writer, SoftDeletesValue, options);
		}

		if (SortDescriptor is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, SortDescriptor, options);
		}
		else if (SortDescriptorAction is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSegmentSortDescriptor(SortDescriptorAction), options);
		}
		else if (SortValue is not null)
		{
			writer.WritePropertyName("sort");
			JsonSerializer.Serialize(writer, SortValue, options);
		}

		if (StoreDescriptor is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, StoreDescriptor, options);
		}
		else if (StoreDescriptorAction is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.StorageDescriptor(StoreDescriptorAction), options);
		}
		else if (StoreValue is not null)
		{
			writer.WritePropertyName("store");
			JsonSerializer.Serialize(writer, StoreValue, options);
		}

		if (TimeSeriesDescriptor is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, TimeSeriesDescriptor, options);
		}
		else if (TimeSeriesDescriptorAction is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsTimeSeriesDescriptor(TimeSeriesDescriptorAction), options);
		}
		else if (TimeSeriesValue is not null)
		{
			writer.WritePropertyName("time_series");
			JsonSerializer.Serialize(writer, TimeSeriesValue, options);
		}

		if (TopMetricsMaxSizeValue.HasValue)
		{
			writer.WritePropertyName("top_metrics_max_size");
			writer.WriteNumberValue(TopMetricsMaxSizeValue.Value);
		}

		if (TranslogDescriptor is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, TranslogDescriptor, options);
		}
		else if (TranslogDescriptorAction is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.TranslogDescriptor(TranslogDescriptorAction), options);
		}
		else if (TranslogValue is not null)
		{
			writer.WritePropertyName("translog");
			JsonSerializer.Serialize(writer, TranslogValue, options);
		}

		if (!string.IsNullOrEmpty(UuidValue))
		{
			writer.WritePropertyName("uuid");
			writer.WriteStringValue(UuidValue);
		}

		if (VerifiedBeforeCloseValue is not null)
		{
			writer.WritePropertyName("verified_before_close");
			JsonSerializer.Serialize(writer, VerifiedBeforeCloseValue, options);
		}

		if (VersionDescriptor is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, VersionDescriptor, options);
		}
		else if (VersionDescriptorAction is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexVersioningDescriptor(VersionDescriptorAction), options);
		}
		else if (VersionValue is not null)
		{
			writer.WritePropertyName("version");
			JsonSerializer.Serialize(writer, VersionValue, options);
		}

		if (OtherSettingsValue is not null)
		{
			foreach (var additionalProperty in OtherSettingsValue)
			{
				writer.WritePropertyName(additionalProperty.Key);
				JsonSerializer.Serialize(writer, additionalProperty.Value, options);
			}
		}

		writer.WriteEndObject();
	}
}